//
//  ScenicModel.swift
//  LeTu
//
//  Created by g1 on 2024/1/2.
//

import Foundation

class ScenicModel: Mappable {
    
    /// 景区介绍
    var brief = ""
    /// 城市id
    var cityId = 1
    /// 城市名称
    var cityName = ""
    /// 收藏数量
    var collections = 0
    /// 国家 0: 中国， 1：外国
    var country = 0
    /// 省id
    var countryProvinceId = 1
    /// 省名称
    var countryProvinceName = ""
    /// 创建时间
    var createTime = ""
    /// 英文介绍
    var englishBrief = ""
    /// 英文名称
    var englishName = ""
    /// 是否点赞
    var hasCollected = true
    /// 热门景点: 0：所有景点 1:普通景点 2: 热门景点
    var hotspot = 1
    /// 景区id
    var id = 9
    /// 听讲权限
    var listenPermission = false
    /// 已收听数
    var listeners = 0
    /// 景区名称
    var name = ""
    /// 景区图片
    var picUrl = ""
    /// 备注
    var remarks = ""
    /// 景区等级 0：所有级别 1: 1A级 2: 2A级 3: 3A级 4: 4A级 5: 5A级
    var scenicLevel = 4
    /// 0: 已上架 1：已下架
    var status = 0
    /// 讲解数目
    var storyNum = 0
    /// 更新时间
    var updateTime = ""
    ///
    var storyTypeList = [StoryTypeModel]()
    
    init() {
        
    }
    
    init(scenicId: Int) {
        id = scenicId
    }
    
    required init?(map: ObjectMapper.Map) {
        
    }
    
    func mapping(map: ObjectMapper.Map) {
        
        brief <- map["brief"]
        cityId <- map["cityId"]
        cityName <- map["cityName"]
        collections <- map["collections"]
        country <- map["country"]
        countryProvinceId <- map["countryProvinceId"]
        countryProvinceName <- map["countryProvinceName"]
        createTime <- map["createTime"]
        englishBrief <- map["englishBrief"]
        englishName <- map["englishName"]
        hasCollected <- map["hasCollected"]
        hotspot <- map["hotspot"]
        id <- map["id"]
        listenPermission <- map["listenPermission"]
        listeners <- map["listeners"]
        name <- map["name"]
        picUrl <- map["picUrl"]
        remarks <- map["remarks"]
        scenicLevel <- map["scenicLevel"]
        status <- map["status"]
        storyNum <- map["storyNum"]
        updateTime <- map["updateTime"]
        storyTypeList <- map["storyTypeList"]
        
    }
    
}

class StoryTypeModel: Mappable {
    
    var createTime: String = ""
    var englishName: String = ""
    var id = 0
    var name: String = ""
    var remarks: String = ""
    var typeId = 0
    
    /// 是否加载完全部
    var isLoadAllSuccess = false

    var sourceArr = [ScenicStoryModel]()
    
    required init?(map: ObjectMapper.Map) {
        
    }
    
    func mapping(map: ObjectMapper.Map) {
        
        createTime <- map["createTime"]
        englishName <- map["englishName"]
        id <- map["id"]
        name <- map["name"]
        remarks <- map["remarks"]
        typeId <- map["typeId"]
        
    }
    
}

